﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using wzwebsite;
using System.Web.SessionState;

public partial class newsbig : System.Web.UI.Page
{
    public static int n_id = 0;
    public static string n_time = "";
    public static string n_name = "";
    public static string n_c = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["id"] != null)
        {
            string sql = "select * from news where new_id =" + Convert.ToInt32(Request["id"]);
            DataTable dt = sqlhelper.GetDataTable(CommandType.Text, sql, null);
            n_id = Convert.ToInt32(dt.Rows[0]["new_id"]);
            n_time = Convert.ToString(dt.Rows[0]["time"]).ToString().Substring(5, (Convert.ToString(dt.Rows[0]["time"]).ToString().IndexOf(" ") - 4)).Replace("-", ".");
            
            n_name = Convert.ToString(dt.Rows[0]["name"]);
            n_c = Convert.ToString(dt.Rows[0]["content_en"]);
        }
        else
        {
            Response.Redirect("news.html");
        }
    }
}
